package com.foreveross.project.usercenterserver.security;

import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

@Data
public class UserInfo extends User {
    private static final long serialVersionUID = -1682227070901462452L;
    private String userId;
    private String nickname;
    private String clientId;

    public UserInfo(String userId, String username, String password,String clientId,boolean enabled,
                    boolean accountNonExpired, boolean credentialsNonExpired,
                    boolean accountNonLocked,
                    Collection<? extends GrantedAuthority> authorities)
            throws IllegalArgumentException {
        super(username, password, enabled, accountNonExpired,
                credentialsNonExpired, accountNonLocked, authorities);
        this.userId = userId;
        this.clientId=clientId;
    }



}
